package com.qmx.qmxapp.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

import com.qmx.qmxapp.R;
import com.qmx.qmxapp.base.BaseActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class ForgotPasswordActivity extends BaseActivity {

    private TextView tip_content;
    @BindView(R.id.next)
    Button next;

    @BindView(R.id.edit_phone)
    EditText edit_phone;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_forgot_password);
        ButterKnife.bind(this);
        tip_content = findViewById(R.id.tip_content);
        tip_content.setText("找回密码");
    }


    private String getPhone() {
        String account = edit_phone.getText().toString();
        if (TextUtils.isEmpty(account)) {
            showToast("手机号不能为空");
            return "";
        }
        return account;
    }

    @OnClick(R.id.next)
    public void onclick(View view) {
        getPhone();
        Intent i = new Intent();
        i.putExtra("mobile", getPhone());
        switch (view.getId()) {
            case R.id.next:
                i.setClass(this, ForgotPasswordCodeActivity.class);
                break;
        }
        startActivity(i);
    }
}
